{eq name="row" value=""}
<title>{$webTitle}
<button class="btn btn-sm btn-cheng btn-1 rx1 bold ml8" onclick="mode_qq_add('index','');">点这里切换到账号密码添加</button>
</title>
<style>#qrimg > img {
    width: 259px;
}</style>
<div class="p6 t-c">
    <div class="qrimgid">
        <div class="f5 bold hong">请使用手机QQ扫描二维码</div>
        <hr/>
        <div class="pt3 pb3" id="qrimg" style="height:280px;"><p class="pt12 hui">二维码加载中</p></div>
        <div class="pt4 pb4 bold"><span class="pr3">登陆地点</span> 
				{if condition="config('sys_is_qqlogin_api_check_1') eq 1"}
				<label class="i-checks ml4"><input type="radio" name="area" value="1"  onclick="_sm_cutover_area();" checked=""><i></i>{:config('sys_is_qqlogin_api_dz_1')}</label>
				{/if}
				{if condition="config('sys_is_qqlogin_api_check_2') eq 1"}
					<label class="i-checks ml4"><input type="radio" name="area" onclick="_sm_cutover_area();" value="2"><i></i>{:config('sys_is_qqlogin_api_dz_2')}</label>
				{/if}
				{if condition="config('sys_is_qqlogin_api_check_3') eq 1"}
					<label class="i-checks ml4"><input type="radio" name="area" onclick="_sm_cutover_area();" value="3"><i></i>{:config('sys_is_qqlogin_api_dz_3')}</label>
				{/if}
				{if condition="config('sys_is_qqlogin_api_check_4') eq 1"}
					<label class="i-checks ml4"><input type="radio" name="area" onclick="_sm_cutover_area();" value="4"><i></i>{:config('sys_is_qqlogin_api_dz_4')}</label>
				{/if}
            </div>
        <hr/>
    </div>
    <div class="pt4 pb4 f5 bold lv" id="smlogin"><span id="loginmsg"></span> <span id="loginload" class="pl3"><i
            class="mode-loading cheng w6 h6 v-4"></i></span></div>
</div>
<script type="text/javascript">
    function _sm_qrpic() {
        var area = $('input[name="area"]:checked').val();
        sm.qrpic('{:url('pc_ajax/qq',['act'=>'saoma'])}?is=get&area=' + area, '');
    }

    function _sm_qrlogin() {
        var area = $('input[name="area"]:checked').val();
        saomaInterID = setInterval(function () {
            sm.qrlogin('{:url('pc_ajax/qq',['act'=>'saoma'])}?stem=qqlist&area=' + area, '');
        }, 2000);
    }

    function _sm_success() {
        if ($("#loginload").length > 0) {
            $(".qrimgid").hide();
            $("#loginload").remove();
            $(".smtutorial").remove();
            $("#qrcodeimg").remove();
            $("#loginmsg").html("<p class='mt9'><i class='icon icon-check f16 lv'></i></p><p class='qing mt5 pb9'>扫码成功，请在手机上确认授权登陆&nbsp; <i class='mode-loading qing w3 h3 v-4'></i></p>");
        }
    }

    function _sm_cutover_area() {
        $("#qrimg").html("<p class='pt12 hui'>二维码加载中</p>");
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    }

    $(function () {
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    });

</script>
{else/}
<title>{$webTitle}</title>
<style>#qrimg > img {
    width: 259px;
}</style>
    <button class="btn btn-sm btn-cheng btn-1 rx1 bold ml8" onclick="mode_qq_add('qqlist',{$row['qid']});">点这里切换到密码更新</button>
    <font class="pl8 lv"><i class="icon icon-location mr2"></i>{:config('sys_is_qqlogin_api_dz_'.$row['area'].'')}服务器</font></title>
<div class="p6 t-c">
    <div class="qrimgid">
        <div class="f5 bold hong">请使用手机QQ扫描二维码</div>
        <div class="mt2 f3 hui">需要在手机QQ登陆{$row['qq']}后扫码，登陆其他QQ时扫码无效</div>
        <hr/>
        <div class="pt3 pb3" id="qrimg" style="height:280px;"><p class="pt12 hui">二维码加载中</p></div>
		<label class="i-checks ml4" style="display: none"><input type="radio" name="area" value="{$row['area']}"  checked=""><i></i>{:config('sys_is_qqlogin_api_dz_'.$row['area'].'')}</label>
        <hr/>
    </div>
    <div class="pt4 pb4 f5 bold lv" id="smlogin"><span id="loginmsg"></span> <span id="loginload" class="pl3"><i
            class="mode-loading cheng w6 h6 v-4"></i></span></div>
</div>
<script type="text/javascript">
    function _sm_qrpic() {
        var area = $('input[name="area"]:checked').val();
        sm.qrpic('{:url('pc_ajax/qq',['act'=>'saoma'])}?is=get&area=' + area, '');
    }

    function _sm_qrlogin() {
        var area = $('input[name="area"]:checked').val();
        saomaInterID = setInterval(function () {
            sm.qrlogin('{:url('pc_ajax/qq',['act'=>'saoma'])}?stem=qqlist&area=' + area, '');
        }, 2000);
    }

    function _sm_success() {
        if ($("#loginload").length > 0) {
            $(".qrimgid").hide();
            $("#loginload").remove();
            $(".smtutorial").remove();
            $("#qrcodeimg").remove();
            $("#loginmsg").html("<p class='mt9'><i class='icon icon-check f16 lv'></i></p><p class='qing mt5 pb9'>扫码成功，请在手机上确认授权登陆&nbsp; <i class='mode-loading qing w3 h3 v-4'></i></p>");
        }
    }

    function _sm_cutover_area() {
        $("#qrimg").html("<p class='pt12 hui'>二维码加载中</p>");
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    }

    $(function () {
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    });

</script>
{/eq}